#!/usr/bin/perl
use Win32::OLE;
use Data::Dumper;
use strict;

my $word=new Win32::OLE("Word.Application") || die "No Word App $!\n";

my $wdWindowStateMaximize=1;
$word->{WindowState}=$wdWindowStateMaximize;
$word->Documents->Add();

my $worddoc=$word->ActiveDocument();
my $wordrng=$worddoc->Range();
$wordrng->Font->{'Bold'}='True';
$wordrng->Font->{'Italic'}='False';
$wordrng->Font->{'Size'}='16';
$wordrng->InsertAfter("Running Word by perl!");
$wordrng->InsertParagraphAfter();

$word->ActiveDocument()->SaveAs("H:\\tech\\perl\\ole_test_perl.doc");
$word->Quit();